package com.example.contact

import androidx.compose.foundation.ExperimentalFoundationApi
import androidx.navigation.NavGraphBuilder
import androidx.navigation.NavHostController
import com.example.contact.navigation.NavigationController
import com.example.contact.navigation.contactNestedNavigationGraph
import com.example.featuresdk.core.AbstractFeatureSDK
import com.example.featuresdk.navigation.INavigationController

class ContactFeatureSDK: AbstractFeatureSDK() {

    companion object{
        const val FEATURE_KEY = "contact"
    }

    override fun featureKey(): String = FEATURE_KEY

    override fun featureDesc(): String = context!!.getString(R.string.contact_feature_desc)

    override fun featureIcon(selected: Boolean): Int {
        return if(selected) R.drawable.ic_sqlserver else R.drawable.ic_sqlserver_dark
    }

    @ExperimentalFoundationApi
    override fun buildNavigationGraph(navGraphBuilder: NavGraphBuilder, navHostController: NavHostController) {
        navGraphBuilder.contactNestedNavigationGraph(navHostController, featureKey())
    }

    override fun getNavigationController(): INavigationController = NavigationController.instance
}
